package com.lh.service.impl;

import com.lh.dao.CategoryDao;
import com.lh.entity.Category;
import com.lh.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author: LuoHang
 * @Date: 2021/2/11 12:26
 * @Description
 */
@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryDao categoryDao;

    @Override
    public List<Category> getCategoryList(Map<String,Object> map) {
        return categoryDao.getCategoryList(map);
    }

    @Override
    public int getCount(Map<String, Object> map) {
        return categoryDao.getCount(map);
    }

    @Override
    public int addCategory(Category category) {
        return categoryDao.addCategory(category);
    }

    @Override
    public int deleteCategoryById(Integer id) {
        return categoryDao.deleteCategoryById(id);
    }

    @Override
    public int updateCategory(Map<String, Object> map) {
        return categoryDao.updateCategory(map);
    }

    @Override
    public Category getCategoryById(Integer id) {
        return categoryDao.getCategoryById(id);
    }
}
